package com.woniu.order.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName zcx_order_application
 */
@TableName(value ="zcx_order_application")
@Data
public class ZcxOrderApplication implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
     * 申请code
     */
    private String applicationCode;

    /**
     * 订单code
     */
    private String orderCode;

    /**
     * 状态  审批状态
     */
    private String status;

    /**
     * 订单类别
     */
    private String orderType;
    /**
     * 付款方式
     */
    private String payment;
    /**
     * 是否免定金
     */
    private String deposit;
    /**
     * 税额
     */
    private BigDecimal tax;

    /**
     * 公司名称
     */
    private String customerName;

    /**
     * 销售code
     */
    private String salesCode;
    /**
     * 销售姓名
     */
    private String salespersonName;
    /**
     * 计算后订单总价
     */
    private BigDecimal totalPrice;
    /**
     * 定金金额
     */
    private BigDecimal depositAmount;

    /**
     * 特价折扣
     */
    private BigDecimal specialDiscount;

    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 创建人
     */
    private String createPerson;

    /**
     * 申请日期
     */
    private String applicationDate;

    /**
     * 申请理由
     */
    private String applicationReason;

    /**
     * 修改申请理由
     */
    private String updateReason;
    /**
     * 审批结果
     */
    private String opinion;



    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ZcxOrderApplication other = (ZcxOrderApplication) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderCode() == null ? other.getOrderCode() == null : this.getOrderCode().equals(other.getOrderCode()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
            && (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
            && (this.getSalesCode() == null ? other.getSalesCode() == null : this.getSalesCode().equals(other.getSalesCode()))
            && (this.getDepositAmount() == null ? other.getDepositAmount() == null : this.getDepositAmount().equals(other.getDepositAmount()))
            && (this.getSpecialDiscount() == null ? other.getSpecialDiscount() == null : this.getSpecialDiscount().equals(other.getSpecialDiscount()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreatePerson() == null ? other.getCreatePerson() == null : this.getCreatePerson().equals(other.getCreatePerson()))
            && (this.getApplicationDate() == null ? other.getApplicationDate() == null : this.getApplicationDate().equals(other.getApplicationDate()))
            && (this.getApplicationReason() == null ? other.getApplicationReason() == null : this.getApplicationReason().equals(other.getApplicationReason()))
            && (this.getUpdateReason() == null ? other.getUpdateReason() == null : this.getUpdateReason().equals(other.getUpdateReason()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderCode() == null) ? 0 : getOrderCode().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
        result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
        result = prime * result + ((getSalesCode() == null) ? 0 : getSalesCode().hashCode());
        result = prime * result + ((getDepositAmount() == null) ? 0 : getDepositAmount().hashCode());
        result = prime * result + ((getSpecialDiscount() == null) ? 0 : getSpecialDiscount().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreatePerson() == null) ? 0 : getCreatePerson().hashCode());
        result = prime * result + ((getApplicationDate() == null) ? 0 : getApplicationDate().hashCode());
        result = prime * result + ((getApplicationReason() == null) ? 0 : getApplicationReason().hashCode());
        result = prime * result + ((getUpdateReason() == null) ? 0 : getUpdateReason().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderCode=").append(orderCode);
        sb.append(", status=").append(status);
        sb.append(", orderType=").append(orderType);
        sb.append(", customerName=").append(customerName);
        sb.append(", salesCode=").append(salesCode);
        sb.append(", depositAmount=").append(depositAmount);
        sb.append(", specialDiscount=").append(specialDiscount);
        sb.append(", createTime=").append(createTime);
        sb.append(", createPerson=").append(createPerson);
        sb.append(", applicationDate=").append(applicationDate);
        sb.append(", applicationReason=").append(applicationReason);
        sb.append(", updateReason=").append(updateReason);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}